package com.geekca.j2.teststatic;

public class Employee {
    public static String companyName;
    private String name;
    private int age;
    private String dept;

    public static int comparebyAge(Employee emp1, Employee emp2) {
        int age1 = emp1.getAge();
        int age2 = emp2.getAge();
        return age1 > age2 ? age1 : age2;
    }

    public void showInfos() {
        System.out.println("name: " + this.name + "age: " + age + "部门: " + dept + " 公司名: " + companyName);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getDept() {
        return dept;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }
}
